home *** CD-ROM | disk | FTP | other *** search
/ Windows Expert / Windows Expert.iso / windownt / awksrc.zip / CONFIG.H < prev    next >
Text File  |  1993-09-28  |  8KB  |  278 lines

  1. /*
  2.  * config.h -- configuration definitions for gawk.
  3.  *
  4.  * __SYSTEM__
  5.  */
  6.  
  7. /* 
  8.  * Copyright (C) 1991, 1992 the Free Software Foundation, Inc.
  9.  * 
  10.  * This file is part of GAWK, the GNU implementation of the
  11.  * AWK Progamming Language.
  12.  * 
  13.  * GAWK is free software; you can redistribute it and/or modify
  14.  * it under the terms of the GNU General Public License as published by
  15.  * the Free Software Foundation; either version 2, or (at your option)
  16.  * any later version.
  17.  * 
  18.  * GAWK is distributed in the hope that it will be useful,
  19.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  20.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  21.  * GNU General Public License for more details.
  22.  * 
  23.  * You should have received a copy of the GNU General Public License
  24.  * along with GAWK; see the file COPYING.  If not, write to
  25.  * the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  26.  */
  27.  
  28. /*
  29.  * This file isolates configuration dependencies for gnu awk.
  30.  * You should know something about your system, perhaps by having
  31.  * a manual handy, when you edit this file.  You should copy config.h-dist
  32.  * to config.h, and edit config.h.  Do not modify config.h-dist, so that
  33.  * it will be easy to apply any patches that may be distributed.
  34.  *
  35.  * The general idea is that systems conforming to the various standards
  36.  * should need to do the least amount of changing.  Definining the various
  37.  * items in ths file usually means that your system is missing that
  38.  * particular feature.
  39.  *
  40.  * The order of preference in standard conformance is ANSI C, POSIX,
  41.  * and the SVID.
  42.  *
  43.  * If you have no clue as to what's going on with your system, try
  44.  * compiling gawk without editing this file and see what shows up
  45.  * missing in the link stage.  From there, you can probably figure out
  46.  * which defines to turn on.
  47.  */
  48.  
  49. /**************************/
  50. /* Miscellanious features */
  51. /**************************/
  52.  
  53. /*
  54.  * BLKSIZE_MISSING
  55.  *
  56.  * Check your /usr/include/sys/stat.h file.  If the stat structure
  57.  * does not have a member named st_blksize, define this.  (This will
  58.  * most likely be the case on most System V systems prior to V.4.)
  59.  */
  60. #define BLKSIZE_MISSING    1 
  61.  
  62. /*
  63.  * SIGTYPE
  64.  *
  65.  * The return type of the routines passed to the signal function.
  66.  * Modern systems use `void', older systems use `int'.
  67.  * If left undefined, it will default to void.
  68.  */
  69. /* #define SIGTYPE    int */
  70.  
  71. /*
  72.  * SIZE_T_MISSING
  73.  *
  74.  * If your system has no typedef for size_t, define this to get a default
  75.  */
  76. /* #define    SIZE_T_MISSING    1 */
  77.  
  78. /*
  79.  * CHAR_UNSIGNED
  80.  *
  81.  * If your machine uses unsigned characters (IBM RT and RS/6000 and others)
  82.  * then define this for use in regex.c
  83.  */
  84. #define CHAR_UNSIGNED    1
  85.  
  86. /*
  87.  * HAVE_UNDERSCORE_SETJMP
  88.  *
  89.  * Check in your /usr/include/setjmp.h file.  If there are routines
  90.  * there named _setjmp and _longjmp, then you should define this.
  91.  * Typically only systems derived from Berkeley Unix have this.
  92.  */
  93. /* #define HAVE_UNDERSCORE_SETJMP    1 */
  94.  
  95. /***********************************************/
  96. /* Missing library subroutines or system calls */
  97. /***********************************************/
  98.  
  99. /*
  100.  * MEMCMP_MISSING
  101.  * MEMCPY_MISSING
  102.  * MEMSET_MISSING
  103.  *
  104.  * These three routines are for manipulating blocks of memory. Most
  105.  * likely they will either all three be present or all three be missing,
  106.  * so they're grouped together.
  107.  */
  108. /* #define MEMCMP_MISSING    1 */
  109. /* #define MEMCPY_MISSING    1 */
  110. /* #define MEMSET_MISSING    1 */
  111.  
  112. /*
  113.  * RANDOM_MISSING
  114.  *
  115.  * Your system does not have the random(3) suite of random number
  116.  * generating routines.  These are different than the old rand(3)
  117.  * routines!
  118.  */
  119. #define RANDOM_MISSING    1 
  120.  
  121. /*
  122.  * STRCASE_MISSING
  123.  *
  124.  * Your system does not have the strcasemp() and strncasecmp()
  125.  * routines that originated in Berkeley Unix.
  126.  */
  127. #define STRCASE_MISSING    1
  128.  
  129. /*
  130.  * STRCHR_MISSING
  131.  *
  132.  * Your system does not have the strchr() and strrchr() functions.
  133.  */
  134. /* #define STRCHR_MISSING    1 */
  135.  
  136. /*
  137.  * STRERROR_MISSING
  138.  *
  139.  * Your system lacks the ANSI C strerror() routine for returning the
  140.  * strings associated with errno values.
  141.  */
  142. /* #define STRERROR_MISSING    1 */
  143.  
  144. /*
  145.  * STRTOD_MISSING
  146.  *
  147.  * Your system does not have the strtod() routine for converting
  148.  * strings to double precision floating point values.
  149.  */
  150. /* #define STRTOD_MISSING    1 */
  151.  
  152. /*
  153.  * STRFTIME_MISSING
  154.  *
  155.  * Your system lacks the ANSI C strftime() routine for formatting
  156.  * broken down time values.
  157.  */
  158. /* #define STRFTIME_MISSING    1 */
  159.  
  160. /*
  161.  * TZSET_MISSING
  162.  *
  163.  * If you have a 4.2 BSD vintage system, then the strftime() routine
  164.  * supplied in the missing directory won't be enough, because it relies on the
  165.  * tzset() routine from System V / Posix.  Fortunately, there is an
  166.  * emulation for tzset() too that should do the trick.  If you don't
  167.  * have tzset(), define this.
  168.  */
  169. /* #define TZSET_MISSING    1 */
  170.  
  171. /*
  172.  * TZNAME_MISSING
  173.  *
  174.  * Some systems do not support the external variables tzname and daylight.
  175.  * If this is the case *and* strftime() is missing, define this.
  176.  */
  177. /* #define TZNAME_MISSING    1 */
  178.  
  179. /*
  180.  * STDC_HEADERS
  181.  *
  182.  * If your system does have ANSI compliant header files that
  183.  * provide prototypes for library routines, then define this.
  184.  */
  185. #define STDC_HEADERS    1 
  186.  
  187. /*
  188.  * NO_TOKEN_PASTING
  189.  *
  190.  * If your compiler define's __STDC__ but does not support token
  191.  * pasting (tok##tok), then define this.
  192.  */
  193. /* #define NO_TOKEN_PASTING    1 */
  194.  
  195. /*****************************************************************/
  196. /* Stuff related to the Standard I/O Library.             */
  197. /*****************************************************************/
  198. /* Much of this is (still, unfortunately) black magic in nature. */
  199. /* You may have to use some or all of these together to get gawk */
  200. /* to work correctly.                         */
  201. /*****************************************************************/
  202.  
  203. /*
  204.  * NON_STD_SPRINTF
  205.  *
  206.  * Look in your /usr/include/stdio.h file.  If the return type of the
  207.  * sprintf() function is NOT `int', define this.
  208.  */
  209. /* #define NON_STD_SPRINTF    1 */
  210.  
  211. /*
  212.  * VPRINTF_MISSING
  213.  *
  214.  * Define this if your system lacks vprintf() and the other routines
  215.  * that go with it.  This will trigger an attempt to use _doprnt().
  216.  * If you don't have that, this attempt will fail and you are on your own.
  217.  */
  218. /* #define VPRINTF_MISSING    1 */
  219.  
  220. /*
  221.  * Casts from size_t to int and back.  These will become unnecessary
  222.  * at some point in the future, but for now are required where the
  223.  * two types are a different representation.
  224.  */
  225. /* #define SZTC */
  226. /* #define INTC */
  227.  
  228. /*
  229.  * SYSTEM_MISSING
  230.  *
  231.  * Define this if your library does not provide a system function
  232.  * or you are not entirely happy with it and would rather use
  233.  * a provided replacement (atari only).
  234.  */
  235. /* #define SYSTEM_MISSING   1 */
  236.  
  237. /*
  238.  * FMOD_MISSING
  239.  *
  240.  * Define this if your system lacks the fmod() function and modf() will
  241.  * be used instead.
  242.  */
  243. /* #define FMOD_MISSING    1 */
  244.  
  245.  
  246. /*******************************/
  247. /* Gawk configuration options. */
  248. /*******************************/
  249.  
  250. /*
  251.  * DEFPATH
  252.  *
  253.  * The default search path for the -f option of gawk.  It is used
  254.  * if the AWKPATH environment variable is undefined.  The default
  255.  * definition is provided here.  Most likely you should not change
  256.  * this.
  257.  */
  258.  
  259. #define DEFPATH    ".;/usr/lib/awk;/usr/local/lib/awk;/users/bin;/apps/mybin" 
  260. #define ENVSEP    ';' 
  261.  
  262. /*
  263.  * alloca already has a prototype defined - don't redefine it
  264.  */
  265. /* #define ALLOCA_PROTO    1 */
  266.  
  267. /*
  268.  * srandom already has a prototype defined - don't redefine it
  269.  */
  270. /* #define SRANDOM_PROTO    1 */
  271.  
  272. /* some other compatibility stuff. */
  273. #define SIGHUP    SIGABRT
  274. #define SIGQUIT    SIGTERM
  275.  
  276. #define GAWK   1
  277.  
  278.